package 随意刷;

import test0ne.TreeNode;

/**
 * 所有大于等于节点的值之和
 */
public class Offer054 {
    public static void main(String[] args) {
        TreeNode root = new TreeNode(1);
        root.left = new TreeNode(2);
        root.left.left = new TreeNode(4);
        root.left.right = new TreeNode(5);
        root.right = new TreeNode(3);
        root.right.left = new TreeNode(6);
        root.right.right = new TreeNode(7);

        Offer054 o = new Offer054();
        o.convertBST(root);
        System.out.println(o.toString());

    }
    public TreeNode convertBST(TreeNode root) {
        convertBST2(root, root.right, null);
        return root;
    }

    private int convertBST2(TreeNode root, TreeNode right, TreeNode parent) {
        if(root == null) {
        }
        return 0;
//        root.val += convertBST2(root.right, root.right.right,)
    }
}
